import request from '@/utils/request'

// 查询品种列表
export function drugList(query) {
  return request({
    url: '/base/drug/list',
    method: 'get',
    params: query
  })
}
// 新增品种
export function adddrug(data) {
  return request({
    url: '/base/drug',
    method: 'post',
    data: data
  })
}


// 获取品种详细信息
export function drugId(id) {
  return request({
    url: `/base/drug/${id}`,
    method: 'get',
  })
}


// 修改品种
export function eitHdrug(data) {
  return request({
    url: '/base/drug',
    method: 'put',
    data: data
  })
}

// 删除品种
export function deldrug(id) {
  return request({
    url: `/base/drug/${id}`,
    method: 'delete'
  })
}

// 导出品种列表
export function exportdrug(data) {
  return request({
    url: '/base/drug/export',
    method: 'post',
    data: data
  })
}
